package com.lw.controller;

import cn.idev.excel.context.AnalysisContext;
import cn.idev.excel.event.AnalysisEventListener;
import com.lw.entity.TbUser;
import lombok.Getter;

@Getter
public class UserImportListener extends AnalysisEventListener<TbUser> {

    @Override
    public void invoke(TbUser tbUser, AnalysisContext analysisContext) {
        System.out.println("解析到一条数据:{}"+tbUser);
        // todo ....保存数据到数据库
        System.out.println(tbUser);
    }

    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {
        System.out.println("数据解析完成");
    }
}
